1 using UnityEngine;
2 using
System.Collections;
3
4 public
abstract class DelegateAction : Action {
5
6     
protected Action action;
7
8     
public void setAction(Action action)
9     {
10         
this.action = action;
11     }
12
13     
protected abstract bool UpdateDelegate (float delta);
14
15     
public override bool Act(float delta)
16     {
17         
try
18         {
19             
return UpdateDelegate(delta);
20         }
21         
finally { }
22     }
23
24     
public override void setActor(Actor actor)
25     {
26         
if (action != null) action.setActor(actor);
27         
base.setActor(actor);
28     }
29 }



Trò chơi đua xe động vật trong UNITY Engine 114.730 lượt xem

Gõ tìm kiếm nhanh...